import request from '@/utils/request'

// 机构列表
export function getMechanismList(data) {
  return request({
    url: '/api/mechanism_list',
    method: 'POST',
    data,
  })
}

//选中机构id传给后台
export function setMec(id) {
  return request({
    url: '/api/set_mec?mec_code=' + id,
    method: 'POST',
  })
}

export function mechanismSetting(data) {
  return request({
    url: '/api/mechanism_setting',
    method: 'POST',
    data,
  })
}

export function mechanismSettingEdit(data) {
  return request({
    url: '/api/mechanism_setting_edit',
    method: 'POST',
    data,
  })
}

export function mechanismDetail(data) {
  return request({
    url: '/api/mechanism_detail',
    method: 'POST',
    data,
  })
}
// 创建机构

export function mechanismAdd(data) {
  return request({
    url: '/api/mechanism_add',
    method: 'POST',
    data,
  })
}

export function mechanismChange(data) {
  return request({
    url: '/api/mechanism_change',
    method: 'POST',
    data,
  })
}

// 手机号搜索集团创始人
export function searchMechanism(data) {
  return request({
    url: '/api/search_mechanism',
    method: 'POST',
    data,
  })
}

//升级为集团
export function setHeadquarters(data) {
  return request({
    url: '/api/set_headquarters',
    method: 'POST',
    data,
  })
}
//机构业绩目标列表
export function mechanismObjective(data) {
  return request({
    url: '/api/mechanism_objective',
    method: 'POST',
    data,
  })
}
// 新建/编辑机构业绩目标

export function mechanismObjectiveAdd(data) {
  return request({
    url: '/api/mechanism_objective_add',
    method: 'POST',
    data,
  })
}
// 菜单  id
export function quickMenuAdd(data) {
  return request({
    url: '/api/quick_menu_add',
    method: 'POST',
    data,
  })
}

export function quickMenuList(data) {
  return request({
    url: '/api/quick_menu_list',
    method: 'POST',
    data,
  })
}
